#include "Defines.h"
#include "renderer.h"
#include "rendertypes.h"
#include "boundingBox.h"

struct aiScene;

struct IDirect3DTexture9;

struct aiNode;

namespace ns
{
	class Node;

	class ENGINE_API Model{
	public:
		Model(const std::string file,Renderer* _renderer, Node* base);
	private:
		int vertexAmmount;
		const aiScene* scene;
		TextureVertex* vertices;
		Renderer* renderer;

		IndexBuffer* indexBuffer;
		VertexBuffer* vertexBuffer;

		BoundingBox* bBox;
		VertexBuffer* bBoxVB;
		IndexBuffer* bBoxIB;
		IDirect3DTexture9* texture;

		bool hasTexture;

		void AddMeshNode(aiNode* node, Node* base);
	};
}